package com.ruoyi.system.controller;

import com.ruoyi.system.service.impl.UrlCheckService;
import org.springframework.beans.factory.annotation.Autowired;
   import org.springframework.web.bind.annotation.GetMapping;
   import org.springframework.web.bind.annotation.RequestParam;
   import org.springframework.web.bind.annotation.RestController;

   @RestController
   public class UrlCheckController {

       @Autowired
       private UrlCheckService urlCheckService;

       @GetMapping("/checkUrl")
       public boolean checkUrl(@RequestParam String url) {
           return urlCheckService.isUrlAccessible(url);
       }
   }
